<template>
    <van-dialog
        title="评论"
        v-model="showDialog"
        show-cancel-button
        :before-close="beforeClose"
        >
        <van-cell-group>
            <van-field
                placeholder="请输入评论内容"
                type="textarea"
            />
            
        </van-cell-group>
        
    </van-dialog>
</template>
<script>
export default {
    name:'comment-dialog',
    data(){
        return {
            showDialog:false
        }
    },
    methods:{
        show(){
            this.showDialog = true;
        },
        beforeClose(action,done){
            if(action === 'confirm'){
                setTimeout(done, 1000);
            }else{
                done()
            }
        }
    }
}
</script>
